#!/usr/bin/env python
# -*- coding: utf-8 -*-

import wx
import engine
import gui

class App(wx.App):
	def OnInit(self):
		core = engine.engine()
		if core.stateConnection == True:
			print "Connect to xmms2d            [OK]"
			x2t = gui.X2T(None,-1,"")
			x2t.setCore(core)
			#x2t.Show()
			x2t.ml.run()
		else:
			dlg = wx.MessageDialog(None, 'The XMMS2 Server not\'s run.','x2t',wx.OK | wx.ICON_INFORMATION)
			dlg.ShowModal()
			dlg.Destroy()
		return True
                
def main():
    """
        main Angel
    """
    app = App()
    app.MainLoop()
    
